<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><?php echo "Editing: " . $pageTitle; ?></title>
<script type="text/javascript" src="tools/openwysiwyg/scripts/wysiwyg.js"></script>
<script type="text/javascript">
	var setting = new WYSIWYG.Settings();
	setting.ImagesDir = "tools/openwysiwyg/images/";
	setting.PopupsDir = "tools/openwysiwyg/popups/";
	setting.CSSFile = "tools/openwysiwyg/styles/wysiwyg.css";
	setting.Width = "900px"; 
	setting.Height = "500px";
	
	// customize toolbar buttons
	setting.addToolbarElement("font", 3, 1); 
	setting.addToolbarElement("fontsize", 3, 2);
	setting.addToolbarElement("headings", 3, 3);

	WYSIWYG.attach('textedit', setting); 
</script>
<link rel="stylesheet" href="themes/default_openwysiwyg/edit_style.css" />
</head>

<body>
	<div id="page">
		<form method="post" action="index.php?action=edit">
			<textarea id="textedit" name="text"><?php echo $encodedPageContent; ?></textarea><br />
			<input type="submit" name="save" value="Save" />
			<input type="submit" name="cancel" value="Cancel" />
			<input type="hidden" name="page" value="<?php echo $_GET["page"] ?>" />
		</form>
	</div>	
</body>

</html>